#ifndef QXGAME_PLAYERMANAGER_H
#define QXGAME_PLAYERMANAGER_H

#include <memory>
#include "Singleton.h"
#include "GameInputEvents.h"
#include "../object/base/Character.h"

class PlayerManager : public Singleton<PlayerManager>, public GameInputEvents {
    friend class Singleton<PlayerManager>;

public:
    void OnUpdate(double delta);
    void OnRender();
    void KeyDown(int32_t &code) override;
    void KeyUp(int32_t &code) override;
    GameVector GetPosition();
    std::shared_ptr<Character> GetPlayer();
    void AddPlayer(const std::shared_ptr<Character>& player);
    void KeyOnJ();

protected:
    PlayerManager();
    ~PlayerManager() = default;

private:
    void ChangerPlayer();
    void ReleaseSkill(int skillId);

private:
    int idx = 0;
    double money = 0;
};


#endif //QXGAME_PLAYERMANAGER_H
